package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.service.UserService;

@RestController
public class UserController {

	@Autowired
	private UserService userService;
	@RequestMapping("/play")
	public Object play() {
		return "play";
	}
	@RequestMapping("/study")
	public Object study() {
		return "study";
	}
	@RequestMapping("/register")
	public Object register(String username,String password) {
		userService.userRegister(username, password);
		return "success";
	}
}
